import { createRouter, createWebHistory } from 'vue-router'
import WeatherHome from '../views/WeatherHome.vue'
import WeatherSearch from '@/views/WeatherSearch.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'WeatherHome',
      component: WeatherHome,
    },
    {
      path: '/weather/:adcode',
      name: 'Search',
      component: WeatherSearch,
    }
  ],
})

export default router
